define([
  'jquery', 
  'underscore', 
  'backbone',
  'models/business_user',
  'collections/businesses',
  /*'models/business',
  'models/service',
  'collections/business',
  'collections/service',*/
  'backboneRelational'
  ], function($, _, Backbone, BusinessUser,BusinessCollection) {

  var UserModel = Backbone.RelationalModel.extend({

    urlRoot: 'api/user',

    relations: [
      {
        type: Backbone.HasMany, 
        key: 'business',
        relatedModel: BusinessUser,
        collectionType: BusinessCollection, 
        reverseRelation: {
          key: 'employees'
        }
      }
    ]

  });

  return UserModel;
});
